package com.xxg.renrensearch.domain.query;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 分页获取店铺列表
 *
 * @author xxg
 * @date 2020/11/25
 */
@Data
@ApiModel(value = "SearchShopListQuery", description = "分页获取店铺列表")
public class SearchShopListQuery {
    @ApiModelProperty(value = "店铺ID", hidden = true)
    private Integer shopId;
    @NotNull(message = "pageNo不能为null")
    @Min(value = 1, message = "pageNo的值不能小于1")
    @ApiModelProperty(value = "页码")
    private Integer pageNo;
    @NotNull(message = "cityCode不能为null")
    @Min(value = 0, message = "cityCode的值不能小于0")
    @ApiModelProperty(value = "城市代码，cityCode为0则搜索全国范围")
    private Integer cityCode;
    @NotNull(message = "keyword不能为null")
    @NotBlank(message = "keyword不能为空")
    @Length(max = 50, message = "keyword最多50个字")
    @ApiModelProperty(value = "店铺关键词")
    private String keyword;
}